import lombok.Data;

@Data

public class Teacher extends Person {
    // 特有属性：技能
    private String skill;
    Teacher(String name, int age){
        super(name,age);

    }

    // 构造方法
    public Teacher() {
        super();


    }

    // Getter 和 Setter 方法
    public String getSkill() {
        return skill;
    }

    public void Work(String skill) {
        this.skill = skill;
        System.out.println(getName() + " is working with skill: " + skill);
    }

    // 特有行为：备课
    public void prepareLesson() {
        System.out.println(getName() + " is preparing lessons.");
    }

    // 特有行为：上课
    public void teach() {
        System.out.println(getName() + " is teaching.");
    }
}